package cn.shengchao.examstar.knowledge.domain.repository;

import cn.shengchao.examstar.knowledge.domain.entity.KnowledgePoint;

import java.util.List;
import java.util.Optional;

/**
 * 知识点仓储接口
 */
public interface KnowledgePointRepository {
    
    /**
     * 保存知识点
     */
    KnowledgePoint save(KnowledgePoint knowledgePoint);
    
    /**
     * 根据ID查询知识点
     */
    Optional<KnowledgePoint> findById(Long id);
    
    /**
     * 根据类目查询知识点
     */
    List<KnowledgePoint> findBySpecificationTypeId(Long specificationTypeId);
    
    /**
     * 根据父节点ID查询知识点
     */
    List<KnowledgePoint> findByParentId(Long parentId);
    
    /**
     * 删除知识点
     */
    void delete(Long id);

    List<KnowledgePoint> getKnowledgePointsByIds(List<Long> ids);
}